﻿using BrnMall.Manager;
using BrnMall.Manager.Domain.PC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QiDong.PC.Api.Models
{
    /// <summary>
    /// PC网站咨询信息
    /// </summary>
    public static class PcConsultManager
    {
        /// <summary>
        /// 添加用户联系信息
        /// </summary>
        /// <param name="verify"></param>
        public static bool AddConsult(PcConsult con)
        {
            object obj = null;
            using (var db = new QDMallDatabase())
            {
                obj = db.Insert(con);
                if (obj != null)
                    return true;
                return false;
            }
        }
        public static PcConsult GetConsult(string phone)
        {
            using (var db = new QDMallDatabase())
            {
                return db.SingleOrDefault<PcConsult>("select * from pc_consult where phone=@0", phone);
            }
        }

    }
}